import { Component } from 'react';
import { PageContainer } from '@ant-design/pro-layout';
import Account from './account'
import Er from './er'

class User_guanli extends Component {
  constructor(props) {
    super(props);
    this.state = {
      aaa : 1
    }
  }
  handleTabChange = (key) => {
      this.setState({
        aaa : key - 0
      })
  }
  render() {
    return ( 
        <div
        style={{
          background: '#F5F7FA',
        }}
      >
        <PageContainer
          fixedHeader
          header={{
            title: '用户管理',
          }}
          tabList={[
            {
              tab: '账号管理',
              key: '1',
            },
            {
              tab: '可点击',
              key: '2',
            },
            {
              tab: '禁用',
              key: '3',
              disabled: true,
            },
          ]}
          onTabChange={this.handleTabChange}
        >
          {this.state.aaa == 1 ? <Account /> : <Er />}
        </PageContainer>
      </div>
    )
  }
}

export default User_guanli;
